﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Net;

namespace PFAGame.GameNetworking
{
    class DataPlayer
    {
        #region Properties
        public Vector2 Position
        {
            get;
            private set;
        }
        public Vector2 Orientation
        {
            get;
            private set;
        }
        public ushort Level
        {
            get;
            private set;
        }
        #endregion

        public DataPlayer()
        {
            Level = 1;
            Orientation = new Vector2();
            Position = new Vector2();
        }

        public void ReveiveData(PacketReader packetReader)
        {
            this.Position = packetReader.ReadVector2();
            this.Orientation = packetReader.ReadVector2();
            this.Level = packetReader.ReadUInt16();
        }
        public void SendData(PacketWriter packetWriter)
        {
            packetWriter.Write(this.Position);
            packetWriter.Write(this.Orientation);
            packetWriter.Write(this.Level);
        }
    }
}
